const {firefox, chromium} = require('playwright');

(async () => {
  console.time('firefox');
  const browser = await chromium.launch({
    headless: false,
  });
  let page;
  page = await browser.newPage({
    proxy: {
      server: 'http://u5329.b5.t.16yun.cn:6460',
      username: '16GADNHJ',
      password: '936441'
    }
  });
  await page.goto('https://www.baidu.com/s?wd=ip&rsv_spt=1&rsv_iqid=0x80af334b0027a56b&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&rsv_dl=tb&rsv_sug3=3&rsv_sug1=3&rsv_sug7=101&rsv_sug2=0&rsv_btype=i&prefixsug=ip&rsp=5&inputT=588&rsv_sug4=938');
  await page.waitForTimeout(2000);
  await page.close();


  page = await browser.newPage({
    proxy: {
      server: 'http://u5329.b5.t.16yun.cn:6460',
      username: '16GADNHJ',
      password: '936441'
    }
  });
  await page.goto('https://www.baidu.com/s?wd=ip&rsv_spt=1&rsv_iqid=0x80af334b0027a56b&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&rsv_dl=tb&rsv_sug3=3&rsv_sug1=3&rsv_sug7=101&rsv_sug2=0&rsv_btype=i&prefixsug=ip&rsp=5&inputT=588&rsv_sug4=938');
  await page.waitForTimeout(2000);
  await page.close();


  await browser.close();
  console.timeEnd('firefox');
})();
